<?php 
if(!isset($_SESSION)) 
{ 
session_start(); 
} 
try{
include 'showscreen.php';
$idmonitor = $_REQUEST['monitorid'];
$winW = $_REQUEST['winW'];
$winH = $_REQUEST['winH'];
$stt =$_REQUEST['stt'];
$bd=$_REQUEST['bd'];
$kt=$_REQUEST['kt'];
$numb= $_REQUEST['numb'];
$cot=sqrt($numb);
$onewidth=($winW-30)/$cot;
$oneheight=($winH-120)/$cot;
$mfont=($onewidth / 21)."px";
$CT= new showscreen();
$CT = unserialize (serialize ($_SESSION['mcar'][$stt]));
?>
<div style="position:absolute;">
<?php 
if($CT->pos==0){
	?>
	<img src="images/noimage.jpg" style='width:<?php echo $onewidth."px"?>;height:<?php echo $oneheight."px"?>;border: 1px solid #CFD6D9;border-radius: 2px;' onerror="this.src='images/noimage.jpg';" />
	<?php 
}else{
	?>
	<img src="<?=$CT->image?>" style='width:<?php echo $onewidth."px"?>;height:<?php echo $oneheight."px"?>;border: 1px solid #CFD6D9;border-radius: 2px;' onerror="this.src='images/noimage.jpg';" />
	<?php 
}
?>
</div>
<div style="position:absolute;">
<table style="background:none;padding:1%;width:<?php echo $onewidth."px"?>;height:<?php echo $oneheight."px"?>;" border="0">
	<tr>
		<td valign="top" >
			<table width="100%"  border="0"  style="background:none; ">
				<tr>
					<td align="left" valign="top"  style="color: yellow;font-size:<?php echo $mfont;?>;"><?php echo $CT->name?></td>
					<td align="right" valign="top">
						<?php if ($CT->light == 1) {?>
		              	<img src='images/circle-green.png' style='width:13px;height:13px;'>
		              	<?php }else if ($CT->light == 0){?>
		              		<img src='images/circle_red.png' style='width:13px;height:13px;'>
		              <?php }?>
					</td>
				</tr>
			</table>
		</td>
	<tr>
	<tr>
		<td valign="bottom">
			<table width="100%"  border="0"  style="background:none; ">
				<tr>
					<td colspan="2" align="right" valign="bottom"   style="color: yellow;font-size:<?php echo $mfont;?>;"><?=$CT->distance?></td>
				</tr>
				<tr>
					<td align="left" valign="middle"   style="color: yellow;font-size:<?php echo $mfont;?>;"><?=$CT->car_datetime?></td>
					<td align="right" valign="middle"  style="color: yellow;font-size:<?php echo $mfont;?>;"><?=$CT->vstriger_type?></td>
				<tr>
				<tr>
					<td align="left" valign="bottom"  style="color: yellow;font-size:<?php echo $mfont;?>;"><?=$CT->platecar?></td>
					<td align="right" valign="bottom"  style="color: yellow;font-size:<?php echo $mfont;?>;"><?=$CT->pos?></td>
				<tr>
			</table>
		</td>
	</tr>
</table>
</div>
<?php 
}catch(Exception $e){
	echo $e->getMessage();
}
?>
